package com.dragon.flow.dao.leave;

import com.dragon.flow.model.leave.Screening;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * description : 筛查Dao接口
 */
@Mapper
@Repository
public interface IScreeningDao {

	/**
	 * 通过id得到Screening
	 */
	public Screening getScreeningById(String id) throws Exception;

	/**
	 * 通过ids批量得到Screening
	 * @param ids 如："'1','2','3','4'..."
	 */
	public List<Screening> getScreeningByIds(@Param("ids") String ids) throws Exception;

	/**
	 * 通过ids批量得到Screening
	 */
	public List<Screening> getScreeningByIdsList(List<String> ids) throws Exception;

	/**
	 * 得到所有Screening
	 */
	public List<Screening> getAll(Screening screening) throws Exception;

	/**
	 * 分页查询Screening
	 */
	public Page<Screening> getPagerModelByQuery(Screening screening) throws Exception;

	/**
	 * 查询记录数
	 */
	public int getByPageCount(Screening screening)throws Exception ;

	/**
	 * 添加Screening
	 */
	public void insertScreening(Screening screening) throws Exception;

	/**
	 * 批量添加Screening
	 */
	public void insertScreeningBatch(List<Screening> screenings) throws Exception;

	/**
	 * 通过id删除Screening
	 */
	public void delScreeningById(String id) throws Exception;

	/**
	 * 通过id批量删除Screening
	 * @param ids 如："'1','2','3','4'..."
	 */
	public void delScreeningByIds(@Param("ids") String ids) throws Exception;

	/**
	 * 通过id批量删除Screening
	 */
	public void delScreeningByIdsList(List<String> ids) throws Exception;

	/**
	 * 通过id修改Screening
	 */
	public int updateScreening(Screening screening) throws Exception;

	/**
	 * 通过ids批量修改Screening
	 * @param ids 如："'1','2','3','4'..."
	 */
	public int updateScreeningByIds(@Param("ids") String ids, @Param("screening") Screening screening) throws Exception;

	/**
	 * 通过ids批量修改Screening
	 */
	public int updateScreeningByIdsList(@Param("ids") List<String> ids, @Param("screening") Screening screening) throws Exception;

	/**
	 * 通过id批量修改Screening
	 */
	public int updateScreeningList(List<Screening> screenings) throws Exception;


}
